<template>
  <common-info-dialog
    :title="dialogTitle"
    :visible.sync="dialogShow"
    @cancel="close"
  >
    <common-info-table>
      <common-info-table-cell label="任务名称">
        {{ detail.executionPolicyName }}
      </common-info-table-cell>
      <common-info-table-cell label="扫描时间"
        >{{ detail.startTime }} - {{ detail.endTime }}
      </common-info-table-cell>
      <common-info-table-cell label="库扫描类型"
        >{{ +detail.scanType === 0 ? "全量" : "增量" }}
      </common-info-table-cell>
      <common-info-table-cell label="表扫描类型"
        >{{ +detail.tablePolicyType === 1 ? "全量" : "样本" }}
      </common-info-table-cell>
      <common-info-table-cell
        label="扫描行数"
        v-if="+detail.tablePolicyType === 2"
        >{{ detail.lineNumber }}
      </common-info-table-cell>
      <common-info-table-cell label="资源范围"
        >{{ detail.resourceRange }}
      </common-info-table-cell>
      <!-- <common-info-table-cell label="组织"
        >{{ detail.deptName }}
      </common-info-table-cell> -->
      <common-info-table-cell label="执行周期"
        >{{ detail.executionCycle }}
      </common-info-table-cell>
    </common-info-table>
  </common-info-dialog>
</template>
<script>
export default {
  data() {
    return {
      dialogTitle: "组任务详情",
      dialogShow: false,
      detail: {},
    };
  },
  methods: {
    show(data) {
      this.dialogShow = true;
      this.detail = data || {};
    },
    close() {
      this.dialogShow = false;
    },
  },
};
</script>

<style lang="scss" scoped></style>
